<?php
	define('PROJECT_PATH'	, realpath('.').'/');
	define('WDK_PATH'		, realpath('../').'/wdk/');
	define('BASE_PATH'		, realpath('.').'/');
	define('CACHE_PATH'		, realpath('../').'/cache/');
	define('PLGPATH'		, BASE_PATH.'_plugin/');
	define('UPLOAD_PATH'	, BASE_PATH.'_files/');

	require_once WDK_PATH.'core/Wdk.php';
	
	try
	{
		$uri = Wdk::helper('Uri');
		$c = new $uri['class'];
		call_user_func_array(array($c, $uri['method']), $uri['params']);
	}
	catch(PageNotFoundException $e)
	{
		echo "Page not found";
	}
	catch(WException $e)
	{
		echo $e->getMessage();
	}